package com.gthncz.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.gthncz.beans.AutoComplement;
import com.gthncz.beans.SpellChecker;
import com.gthncz.beans.TextEditor;

@Configuration
public class TextEditorConfig {
	private static final String Tag = TextEditorConfig.class.getSimpleName();
	
	public TextEditorConfig() {
		System.out.println(Tag + " run on constructor. ");
	}
	
	@Bean
	public TextEditor textEditor() {
		System.out.println(Tag + " run on textEditor. ");
		return new TextEditor(spellChecker());
	}
	
	@Bean
	public SpellChecker spellChecker() {
		System.out.println(Tag + " run on spellChecker. ");
		return new SpellChecker();
	}
	
	@Bean
	public AutoComplement autoComplement() {
		System.out.println(Tag + " run on autoComplement. ");
		return new AutoComplement();
	}

}
